package bean;

import java.io.Serializable;

/**
 * Moral :
 * Created by 卖火柴的小女孩 on 2018/2/12.
 */

public class UserBean implements Serializable {

    private String userName;
    private String userPwd;

    public UserBean(String userName, String userPwd) {
        this.userName = userName;
        this.userPwd = userPwd;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPwd() {
        return userPwd;
    }

    public void setUserPwd(String userPwd) {
        this.userPwd = userPwd;
    }

    @Override
    public boolean equals(Object o) {
        UserBean userBean = (UserBean) o;
        if (userBean.toString() == toString())
            return true;
        else return false;
    }

    @Override
    public int hashCode() {
        int result = userName != null ? userName.hashCode() : 0;
        result = 31 * result + (userPwd != null ? userPwd.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "UserBean{" +
                "userName='" + userName + '\'' +
                ", userPwd='" + userPwd + '\'' +
                '}';
    }
}
